A moving image coding apparatus and a moving image decoding apparatus are used to efficiently transfer or record a moving image. The moving image coding apparatus generates coded data by coding a moving image, and the moving image decoding apparatus generates a decoded image by decoding coded data.
Specific moving image coding schemes, for example, include a scheme adopted in KTA software that is joint development codec in H. 264/MPEG-4. AVC, VCEG (Video Coding Expert Group, a scheme adopted in TMuC (Test Model under Consideration) software, and a scheme (Non Patent Literature 1) disclosed in HEVC (High-Efficiency Video Coding) as codec as a successor to the scheme adopted in TMuC.
In these moving image coding schemes, a prediction image is generated based on a locally decoded image that is obtained by coding/decoding an input image. A prediction residue (also referred to as a “difference image” or a “residual image”) resulting from subtracting the prediction image from the input image (original image) is coded. The generation methods of the prediction image may include inter-image prediction (inter prediction) and intra-image prediction (intra prediction).
In the inter prediction, a prediction image in a prediction target frame is generated on each prediction unit (such as a block) by applying motion-vector-based motion compensation to a reference signal in a reference frame (decoded image) with the entire portion thereof decoded.
In the intra prediction, on the other hand, prediction images in the frame are successively generated based on a locally decoded image within the same frame. More specifically, in the intra prediction, a prediction mode is normally selected on a per prediction unit basis (such as block) from prediction modes included in a predetermined prediction mode group, and a prediction image is generated based on the prediction method corresponding to the selected prediction mode. The prediction methods include horizontal prediction, vertical prediction, DC prediction, planar prediction, and angular prediction. A unique prediction mode number is assigned to each prediction mode. Based on the prediction mode number decoded from coded data, the moving image decoding apparatus determines the prediction method that is to be applied to a prediction target region. The angular prediction is associated with a prediction mode corresponding to a plurality of prediction directions. The moving image decoding apparatus determines the prediction direction based on the prediction mode number, and generates the prediction image based on the determined prediction direction.
As for the prediction mode of luma, a short code is assigned to an estimation prediction mode derived from a prediction mode of an adjacent prediction unit. On the other hand, as for the prediction mode of chroma, a short code is assigned to an estimation prediction mode that reuses a prediction mode applied to the corresponding luma prediction unit (luma prediction mode reuse).